home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / 93src.lha / src / build / inithooks.sml < prev    next >
Encoding:
Text File  |  1993-01-29  |  2.9 KB  |  77 lines

  1. (* Copyright 1992 by AT&T Bell Laboratories *)
  2. (* build/inithooks.sml *)
  3.  
  4. functor InitHooks(structure Interact: INTERACT
  5.           structure Compile: COMPILEUNIT) : sig end =
  6. struct
  7.  
  8.   open System.Hooks
  9.   val cast = System.Unsafe.cast
  10.  
  11.   fun makeSource(srcName,lineNum,sourceStream,interactive,ppconsumer)
  12.       : Source.inputSource =
  13.       Source.newSource(srcName,lineNum,sourceStream,interactive,ppconsumer,
  14.                Index.openIndexFile srcName)
  15.  
  16.   val _ =
  17.  
  18.   (
  19.   (* System.Symbol *)
  20.      valSymbol_ref    := cast Symbol.varSymbol;
  21.      tycSymbol_ref    := cast Symbol.tycSymbol;
  22.      sigSymbol_ref    := cast Symbol.sigSymbol;
  23.      strSymbol_ref    := cast Symbol.strSymbol;
  24.      fctSymbol_ref    := cast Symbol.fctSymbol;
  25.      fixSymbol_ref    := cast Symbol.fixSymbol;
  26.      labSymbol_ref    := cast Symbol.labSymbol;
  27.      tyvSymbol_ref    := cast Symbol.tyvSymbol;
  28.      fsigSymbol_ref   := cast Symbol.fsigSymbol;
  29.      name_ref         := cast Symbol.name;
  30.      makestring_ref   := cast Symbol.symbolToString;
  31.      kind_ref         := cast (Symbol.nameSpaceToString o Symbol.nameSpace);
  32.      nameSpace_ref    := cast Symbol.nameSpace;
  33.  
  34.   (* System.Env *)
  35.      emptyEnv_ref     := cast (fn () => Environment.emptyEnv);
  36.      concatEnv_ref    := cast Environment.concatEnv;
  37.      layerEnv_ref     := cast Environment.layerEnv;
  38.      staticPart_ref   := cast Environment.staticPart;
  39.      layerStatic_ref  := cast Environment.layerStatic;
  40.      filterEnv_ref    := cast Environment.filterEnv;
  41.      filterStaticEnv_ref    := cast Environment.filterStaticEnv;
  42.      catalogEnv_ref   := cast Environment.catalogEnv;
  43.      describe_ref     := cast Environment.describe;
  44.  
  45.   (* System.Compile *)
  46.      makeSource_ref  := cast makeSource;
  47.      closeSource_ref := cast Source.closeSource;
  48.      changeLvars_ref := cast Compile.changeLvars;
  49.      elaborate_ref   := cast Compile.elaborateUnit;
  50.      parse_ref       := cast Compile.parseUnit;
  51.      compile_ref     := cast Compile.compileUnit;
  52.      compileAst_ref  := cast Compile.compileAst;
  53.      execute_ref     := cast Compile.executeUnit;
  54.      eval_stream_ref := cast Interact.eval_stream;
  55.      use_file_ref    := cast Interact.use_file;
  56.      use_stream_ref  := cast Interact.use_stream;
  57.  
  58.   (* System.Control *)
  59.      allocProfReset_ref := cast AllocProf.reset;
  60.      allocProfPrint_ref := cast AllocProf.print_profile_info;
  61.  
  62.   (* System.PrettyPrint *)
  63.      mk_ppstream_ref := cast PrettyPrint.mk_ppstream;
  64.      dest_ppstream_ref := cast PrettyPrint.dest_ppstream;
  65.      begin_block_ref := cast PrettyPrint.begin_block;
  66.      end_block_ref := cast PrettyPrint.end_block;
  67.      add_break_ref := cast PrettyPrint.add_break;
  68.      add_string_ref := cast PrettyPrint.add_string;
  69.      add_newline_ref := cast PrettyPrint.add_newline;
  70.      clear_ppstream_ref := cast PrettyPrint.clear_ppstream;
  71.      flush_ppstream_ref := cast PrettyPrint.flush_ppstream;
  72.      with_pp_ref := cast PrettyPrint.with_pp;
  73.      install_pp_ref := cast PPTable.install_pp
  74.     )
  75.  
  76. end (* functor InitHooks *)
  77.